package cn.sumpu.app.wlcity.biz;

import java.util.List;
import java.util.Map;

import cn.sumpu.app.wlcity.domain.PageModel;
import cn.sumpu.app.wlcity.domain.Vote;
import cn.sumpu.app.wlcity.domain.VoteItem;
import cn.sumpu.app.wlcity.exception.AppBusinessException;

public interface VoteBiz {
	public void insertVote(Vote vote) throws AppBusinessException;
	
	public void saveVote(Vote vote) throws AppBusinessException;
	
	public void saveVoteItem(VoteItem voteItem) throws AppBusinessException;
	
	public void insertVoteItem(VoteItem voteItem) throws AppBusinessException;

	public void deleteVote(String identifier) throws AppBusinessException;
	
	public void deleteVoteAndChangeSort(String identifier,Integer sort,String app) throws AppBusinessException;
	
	public void deleteVoteItem(String identifier) throws AppBusinessException;

	public List<Vote> getVoteAndVoteItemList(String app,Integer page) throws AppBusinessException;
	
	public List<Vote> getVoteList(Integer page) throws AppBusinessException;
	
	public PageModel getFrontVotePageModel(Integer page,String app) throws AppBusinessException;
	
	public List<Vote> getFrontVoteList(Integer page,String app) throws AppBusinessException;
	
	public List<VoteItem> getVoteItemList(String voteId,Integer page) throws AppBusinessException;
	
	public int getVoteListCount(String app) throws AppBusinessException;

	public void updateVote(Vote vote) throws AppBusinessException;
	
	public Vote getVoteById(String id) throws AppBusinessException;
	
	public VoteItem getVoteItemById(String id) throws AppBusinessException;
	
	public void updateVoteItem(VoteItem voteItem) throws AppBusinessException;
	
	public void closeVote(String voteId) throws AppBusinessException;
	
	public void openVote(String voteId) throws AppBusinessException;
	
	public void upEachVoteSort(String app) throws AppBusinessException;
	
	public void moveVoteSortUp(String voteId) throws AppBusinessException;
	
	public void moveVoteSortDown(String voteId) throws AppBusinessException;
	
	public void downEachVoteSort(Map<String, Object> map) throws AppBusinessException;
	
	public Boolean insertVoteUsePhone(String voteItemId,String phone,String app)throws AppBusinessException;
	
	public int getVoteItemListCount(String parentVoteId) throws AppBusinessException;
	
	public int getVoteCountByPhoneDate(String phone,String date) throws AppBusinessException;
	
	public PageModel getVoteRank(Integer page,String voteType)throws AppBusinessException;
	
	public PageModel getVote(Integer page,String app,String voteType)throws AppBusinessException;
	
	public PageModel getVoteItemLists(String voteId,Integer page) throws AppBusinessException;
	
	
}
